<template>
  <div class="container">
    <!-- 顶部通栏 -->
    <AppNavbar></AppNavbar>
    <!-- 头部 -->
    <!-- <header>头部组件</header> -->
    <AppHeader></AppHeader>
    <!-- 内容容器 -->
    <div class="app-body">
      <!-- 二级路由 -->
      <RouterView></RouterView>
    </div>
    <!-- 底部 -->
    <!-- <footer>底部组件</footer> -->
    <AppFooter></AppFooter>
    <AppHeaderSticky></AppHeaderSticky>
  </div>
</template>

<script>
import AppNavbar from '@/components/app-topnav.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import AppHeaderSticky from '@/components/app-header-sticky.vue'
import { useStore } from 'vuex'
export default {
  components: {
    AppNavbar,
    AppHeader,
    AppFooter,
    AppHeaderSticky
  },
  name: 'LayOut',
  // 获取分类数据
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>
<style  scoped lang="less">
.app-body {
  min-height: 600px;
}
</style>
